import pytest
import requests
from send.Send import Send
from utils.read_yaml import read_yaml


class Test_login:

    @pytest.mark.parametrize("args", read_yaml("D:/Projects/接口自动化/data/login.yaml"))
    def  test_login(self,args):
        exp = args["exp"]
        session  = requests.session()
        se = Send()

        result = se.send_login(session,args)

        assert result["code"] == 200 and result["body"]["code"] == exp


